package com.digitalchina.lxnsy.activity.old;

import android.os.Bundle;
import androidx.viewpager.widget.ViewPager;

import com.digitalchina.lxnsy.R;
import com.digitalchina.lxnsy.adapter.TabViewPagerAdapter;
import com.digitalchina.lxnsy.base.BaseActivity;
import com.digitalchina.lxnsy.entity.PagerItemVO;
import com.digitalchina.lxnsy.fragment.TechnologyTrainingArticleFragment;
import com.digitalchina.lxnsy.fragment.TechnologyTrainingVideoFragment;
import com.digitalchina.lxnsy.view.MyTabLayout;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * ================================================
 * 项目名称：BigData
 * 类描述：
 * 包名：com.digitalchina.bigdata.activity
 * 创建人：白彦东
 * 创建时间：2017/3/21 15:00
 * 修改备注：
 * ================================================
 */

public class ArticleAndVideoListActivity extends BaseActivity {
    @Bind(R.id.technology_training_tab)
    MyTabLayout technologyTrainingTab;
    @Bind(R.id.technology_training_tab_viewpager)
    ViewPager technologyTrainingTabViewpager;

    /*每个 tab 的 item*/
    private List<PagerItemVO> mList = new ArrayList<>();

    @Override
    public void setLayout() {
        setTitle("农技培训");
        setContentLayout(R.layout.activity_article_and_video_list);
    }

    @Override
    public void initMember() {
        mList.add(new PagerItemVO("视频", new TechnologyTrainingVideoFragment()));
        mList.add(new PagerItemVO("文章", new TechnologyTrainingArticleFragment()));

        technologyTrainingTabViewpager.setAdapter(new TabViewPagerAdapter(getFragmentManager(), mList));
        technologyTrainingTab.setViewPager(technologyTrainingTabViewpager);
    }

    @Override
    public void addListener() {

    }

    @Override
    public void setHandler() {

    }

    @Override
    public void callBack(Object object) {

    }

    @Override
    public void rightOnClick() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
}
